package com.bt.springboot.rabbitmq;

import com.bt.springboot.config.DelayedExchangeConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author zkx
 * @Date 2024/1/6 16:16
 */
@Slf4j
@Component
public class DelayedMessageConsumer {

	@RabbitListener(queues = DelayedExchangeConfig.DELAYED_QUEUE_NAME)
	public void receiveDelayedMessage(String message){
		log.info("Received delayed message: {}",message);
	}

}
